package org.apache.ibatis.demo.decorationTest;

/**
 * @Date 2021/2/20 22:23
 * @Created decorationTest
 * @Description
 */
public class CacheExecutor implements Executor {

  Executor executor;

  public CacheExecutor(Executor executor) {
    this.executor = executor;
  }

  public CacheExecutor() {
    this.executor = new SimpleExecutor();
  }

  @Override
  public void play() {

    System.out.println("我是Cache类中的play——二级缓存");
    executor.play();
  }
}


